package com.okyai.kt.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.okyai.kt.mapper.RecordAnnexMapper;
import com.okyai.kt.domain.RecordAnnex;
import com.okyai.kt.service.IRecordAnnexService;
import com.okyai.common.core.text.Convert;

/**
 * 档案方案附件Service业务层处理
 * 
 * @author okyai
 * @date 2021-03-20
 */
@Service
public class RecordAnnexServiceImpl implements IRecordAnnexService 
{
    @Autowired
    private RecordAnnexMapper recordAnnexMapper;

    /**
     * 查询档案方案附件
     * 
     * @param annexId 档案方案附件ID
     * @return 档案方案附件
     */
    @Override
    public RecordAnnex selectRecordAnnexById(Long annexId)
    {
        return recordAnnexMapper.selectRecordAnnexById(annexId);
    }

    /**
     * 查询档案方案附件列表
     * 
     * @param recordAnnex 档案方案附件
     * @return 档案方案附件
     */
    @Override
    public List<RecordAnnex> selectRecordAnnexList(RecordAnnex recordAnnex)
    {
        return recordAnnexMapper.selectRecordAnnexList(recordAnnex);
    }

    /**
     * 新增档案方案附件
     * 
     * @param recordAnnex 档案方案附件
     * @return 结果
     */
    @Override
    public int insertRecordAnnex(RecordAnnex recordAnnex)
    {
        return recordAnnexMapper.insertRecordAnnex(recordAnnex);
    }

    /**
     * 修改档案方案附件
     * 
     * @param recordAnnex 档案方案附件
     * @return 结果
     */
    @Override
    public int updateRecordAnnex(RecordAnnex recordAnnex)
    {
        return recordAnnexMapper.updateRecordAnnex(recordAnnex);
    }

    /**
     * 删除档案方案附件对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteRecordAnnexByIds(String ids)
    {
        return recordAnnexMapper.deleteRecordAnnexByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除档案方案附件信息
     * 
     * @param annexId 档案方案附件ID
     * @return 结果
     */
    @Override
    public int deleteRecordAnnexById(Long annexId)
    {
        return recordAnnexMapper.deleteRecordAnnexById(annexId);
    }
}
